package com.diaohw.module.metadata.obj.convert;

import com.diaohw.module.metadata.obj.dto.MetaVersionDTO;
import com.diaohw.module.metadata.obj.entity.MetaVersionDO;
import com.diaohw.module.metadata.obj.vo.MetaVersionVO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 元数据版本号 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-07
 */
@Mapper
public interface MetaVersionConvert {

    MetaVersionConvert INSTANCE = Mappers.getMapper(MetaVersionConvert.class);

    /**
     * dto to entity
     */
    @InheritConfiguration
    MetaVersionDO dtoToEntity(MetaVersionDTO dto);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaVersionDTO entityToDto(MetaVersionDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaVersionVO entityToVo(MetaVersionDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    List<MetaVersionVO> entityToVo(List<MetaVersionDO> list);


}

